\(\int \frac {1}{a+\sqrt {-a} x} \, dx\) [274]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 20 \[ \int \frac {1}{a+\sqrt {-a} x} \, dx=\frac {\log \left (a+\sqrt {-a} x\right )}{\sqrt {-a}} \]

[Out]

ln(a+x*(-a)^(1/2))/(-a)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {31} \[ \int \frac {1}{a+\sqrt {-a} x} \, dx=\frac {\log \left (\sqrt {-a} x+a\right )}{\sqrt {-a}} \]

[In]

Int[(a + Sqrt[-a]*x)^(-1),x]

[Out]

Log[a + Sqrt[-a]*x]/Sqrt[-a]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\log \left (a+\sqrt {-a} x\right )}{\sqrt {-a}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {1}{a+\sqrt {-a} x} \, dx=\frac {\log \left (a+\sqrt {-a} x\right )}{\sqrt {-a}} \]

[In]

Integrate[(a + Sqrt[-a]*x)^(-1),x]

[Out]

Log[a + Sqrt[-a]*x]/Sqrt[-a]

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85

method result size
default \(\frac {\ln \left (a +x \sqrt {-a}\right )}{\sqrt {-a}}\) \(17\)

[In]

int(1/(a+x*(-a)^(1/2)),x,method=_RETURNVERBOSE)

[Out]

ln(a+x*(-a)^(1/2))/(-a)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {1}{a+\sqrt {-a} x} \, dx=-\frac {\sqrt {-a} \log \left (x - \sqrt {-a}\right )}{a} \]

[In]

integrate(1/(a+x*(-a)^(1/2)),x, algorithm="fricas")

[Out]

-sqrt(-a)*log(x - sqrt(-a))/a

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {1}{a+\sqrt {-a} x} \, dx=\frac {\log {\left (a + x \sqrt {- a} \right )}}{\sqrt {- a}} \]

[In]

integrate(1/(a+x*(-a)**(1/2)),x)

[Out]

log(a + x*sqrt(-a))/sqrt(-a)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.80 \[ \int \frac {1}{a+\sqrt {-a} x} \, dx=\frac {\log \left (\sqrt {-a} x + a\right )}{\sqrt {-a}} \]

[In]

integrate(1/(a+x*(-a)^(1/2)),x, algorithm="maxima")

[Out]

log(sqrt(-a)*x + a)/sqrt(-a)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {1}{a+\sqrt {-a} x} \, dx=\frac {\log \left ({\left | \sqrt {-a} x + a \right |}\right )}{\sqrt {-a}} \]

[In]

integrate(1/(a+x*(-a)^(1/2)),x, algorithm="giac")

[Out]

log(abs(sqrt(-a)*x + a))/sqrt(-a)

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.80 \[ \int \frac {1}{a+\sqrt {-a} x} \, dx=\frac {\ln \left (x-\sqrt {-a}\right )}{\sqrt {-a}} \]

[In]

int(1/(a + (-a)^(1/2)*x),x)

[Out]

log(x - (-a)^(1/2))/(-a)^(1/2)